﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="ChietKhau.aspx.cs" Inherits="ChietKhau" Title="ChietKhau List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Chiet Khau List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="ChietKhauDataSource"
				DataKeyNames="ChietKhauId"
				AllowMultiColumnSorting="false"
				DefaultSortColumnName="" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_ChietKhau.xls"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />				
				<asp:BoundField DataField="ChietKhauId" HeaderText="Chiet Khau Id" SortExpression="ChietKhauID" ReadOnly />
				<asp:BoundField DataField="StartDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Start Date" SortExpression="StartDate"  />
				<asp:BoundField DataField="EndDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="End Date" SortExpression="EndDate"  />
				<data:HyperLinkField HeaderText="Dieu Kien Giam Gia Id" DataNavigateUrlFormatString="DieuKienGiamGiaEdit.aspx?DieuKienId={0}" DataNavigateUrlFields="DieuKienId" DataContainer="DieuKienGiamGiaIdSource" DataTextField="DieuKienChung" />
				<asp:BoundField DataField="GhiChu" HeaderText="Ghi Chu" SortExpression="GhiChu"  />
				<asp:BoundField DataField="LastUpdate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Last Update" SortExpression="LastUpdate"  />
				<asp:BoundField DataField="UpdateBy" HeaderText="Update By" SortExpression="UpdateBy"  />
				<asp:BoundField DataField="Header" HeaderText="Header" SortExpression="Header"  />
				<data:HyperLinkField HeaderText="Nhom Khach Hang Id" DataNavigateUrlFormatString="NhomKhachHangEdit.aspx?NhomKhachHangId={0}" DataNavigateUrlFields="NhomKhachHangId" DataContainer="NhomKhachHangIdSource" DataTextField="KhachHangId" />
			</Columns>
			<EmptyDataTemplate>
				<b>No ChietKhau Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnChietKhau" OnClientClick="javascript:location.href='ChietKhauEdit.aspx'; return false;" Text="Add New"></asp:Button>
		<data:ChietKhauDataSource ID="ChietKhauDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:ChietKhauProperty Name="NhomKhachHang"/> 
					<data:ChietKhauProperty Name="DieuKienGiamGia"/> 
					<%--<data:ChietKhauProperty Name="ChietKhauDoanhSoCollection" />--%>
					<%--<data:ChietKhauProperty Name="ChietKhauNhanhCollection" />--%>
					<%--<data:ChietKhauProperty Name="ChietKhauSanPhamCollection" />--%>
				</Types>
			</DeepLoadProperties>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:ChietKhauDataSource>
	    		
</asp:Content>



